{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Gapminder Bubble Plot\n",
    "=====================\n",
    "This example shows how to make a bubble plot showing the correlation between\n",
    "health and income for 187 countries in the world (modified from an example\n",
    "in Lisa Charlotte Rost's blog post ('One Chart, Twelve Charting Libraries')[http://lisacharlotterost.github.io/2016/05/17/one-chart-code/)].\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# category: basic charts\n",
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from vega_datasets import data\n",
    "\n",
    "gapminder = data.gapminder_health_income.url\n",
    "\n",
    "alt.Chart(gapminder).mark_circle().encode(\n",
    "    alt.X('income:Q', scale=alt.Scale(type='log')),\n",
    "    alt.Y('health:Q', scale=alt.Scale(zero=False)),\n",
    "    size='population:Q'\n",
    ")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
